# Makefile for program source directory in GNU NLS utilities package.
# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
# Copyright (C) 2004-2008 Rodney Dawes <dobey.pwns@gmail.com>
#
# This file may be copied and used freely without restrictions.  It may
# be used in projects which are not available under a GNU Public License,
# but which still want to provide support for the GNU gettext functionality.
#
# - Modified by Owen Taylor <otaylor@redhat.com> to use GETTEXT_PACKAGE
#   instead of PACKAGE and to look for po2tbl in ./ not in intl/
#
# - Modified by jacob berkman <jacob@ximian.com> to install
#   Makefile.in.in and po2tbl.sed.in for use with glib-gettextize
#
# - Modified by Rodney Dawes <dobey.pwns@gmail.com> for use with intltool
#
# We have the following line for use by intltoolize:
# INTLTOOL_MAKEFILE

GETTEXT_PACKAGE = dia
PACKAGE = dia
VERSION = 0.96+svn

SHELL = /bin/sh

srcdir = .
top_srcdir = ..
top_builddir = ..


prefix = /usr/local
exec_prefix = ${prefix}
datadir = ${datarootdir}
datarootdir = ${prefix}/share
libdir = ${exec_prefix}/lib
DATADIRNAME = share
itlocaledir = $(prefix)/$(DATADIRNAME)/locale
subdir = po
install_sh = $(SHELL) /personal/svn-work/marleine-svn/dia/install-sh
# Automake >= 1.8 provides /bin/mkdir -p.
# Until it can be supposed, use the safe fallback:
mkdir_p = $(install_sh) -d

INSTALL = /usr/bin/install -c
INSTALL_DATA = ${INSTALL} -m 644

GMSGFMT = /usr/bin/msgfmt
MSGFMT = /usr/bin/msgfmt
XGETTEXT = /usr/bin/xgettext
INTLTOOL_UPDATE = $(top_builddir)/intltool-update
INTLTOOL_EXTRACT = $(top_builddir)/intltool-extract
MSGMERGE = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist
GENPOT   = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot

ALL_LINGUAS = 

PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; fi)

USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep ^$$lang$$ $(srcdir)/LINGUAS`" -o -n "`echo $$ALINGUAS|grep ' ?$$lang ?'`"; then printf "$$lang "; fi; done; fi)

USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else if test -n "$(PO_LINGUAS)"; then LLINGUAS="$(PO_LINGUAS)"; else LLINGUAS="$(ALL_LINGUAS)"; fi; fi; for lang in $$LLINGUAS; do printf "$$lang "; done)

POFILES=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done)

DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(POFILES)
EXTRA_DISTFILES = POTFILES.skip Makevars LINGUAS

POTFILES = \
	../app/app_procs.c \
	../app/autosave.c \
	../app/color_area.c \
	../app/commands.c \
	../app/defaults.c \
	../app/dia-props.c \
	../app/dia_embedd.c \
	../app/diacanvas.c \
	../app/diagram.c \
	../app/diagram_tree.c \
	../app/diagram_tree_menu.c \
	../app/diagram_tree_window.c \
	../app/diapagelayout.c \
	../app/disp_callbacks.c \
	../app/display.c \
	../app/exit_dialog.c \
	../app/filedlg.c \
	../app/find-and-replace.c \
	../app/interface.c \
	../app/layer_dialog.c \
	../app/linewidth_area.c \
	../app/load_save.c \
	../app/menus.c \
	../app/modify_tool.c \
	../app/pagesetup.c \
	../app/plugin-manager.c \
	../app/preferences.c \
	../app/properties.c \
	../app/recent_files.c \
	../app/sheets.c \
	../app/sheets_dialog.c \
	../app/sheets_dialog_callbacks.c \
	../app/splash.c \
	../app/winmain.c \
	../dia.desktop.in.in \
	../lib/arrows.c \
	../lib/attributes.c \
	../lib/bezier_conn.c \
	../lib/create.c \
	../lib/dia_dirs.c \
	../lib/dia_xml.c \
	../lib/diaarrowchooser.c \
	../lib/diagramdata.c \
	../lib/dialinechooser.c \
	../lib/dialogs.c \
	../lib/filter.c \
	../lib/font.c \
	../lib/message.c \
	../lib/newgroup.c \
	../lib/object_defaults.c \
	../lib/plug-ins.c \
	../lib/prop_inttypes.c \
	../lib/prop_text.c \
	../lib/prop_widgets.c \
	../lib/propdialogs.c \
	../lib/properties.c \
	../lib/properties.h \
	../lib/proplist.c \
	../lib/text.c \
	../lib/widgets.c \
	../objects/AADL/aadl.c \
	../objects/AADL/aadlbox.c \
	../objects/Database/compound.c \
	../objects/Database/database.c \
	../objects/Database/table.c \
	../objects/Database/table_dialog.c \
	../objects/Database/reference.c \
	../objects/ER/attribute.c \
	../objects/ER/entity.c \
	../objects/ER/er.c \
	../objects/ER/participation.c \
	../objects/ER/relationship.c \
	../objects/FS/flow-ortho.c \
	../objects/FS/flow.c \
	../objects/FS/fs.c \
	../objects/FS/function.c \
	../objects/GRAFCET/action.c \
	../objects/GRAFCET/condition.c \
	../objects/GRAFCET/grafcet.c \
	../objects/GRAFCET/step.c \
	../objects/GRAFCET/transition.c \
	../objects/GRAFCET/vector.c \
	../objects/GRAFCET/vergent.c \
	../objects/Istar/actor.c \
	../objects/Istar/goal.c \
	../objects/Istar/istar.c \
	../objects/Istar/link.c \
	../objects/Istar/other.c \
	../objects/Jackson/domain.c \
	../objects/Jackson/jackson.c \
	../objects/Jackson/phenomenon.c \
	../objects/Jackson/requirement.c \
	../objects/KAOS/goal.c \
	../objects/KAOS/kaos.c \
	../objects/KAOS/metaandorrel.c \
	../objects/KAOS/metabinrel.c \
	../objects/KAOS/other.c \
	../objects/Misc/analog_clock.c \
	../objects/Misc/libmisc.c \
	../objects/Misc/measure.c \
	../objects/Misc/tree.c \
	../objects/SADT/annotation.c \
	../objects/SADT/arrow.c \
	../objects/SADT/box.c \
	../objects/SADT/sadt.c \
	../objects/SISSI/area.c \
	../objects/SISSI/classification.h \
	../objects/SISSI/faraday.c \
	../objects/SISSI/room.c \
	../objects/SISSI/sissi.c \
	../objects/SISSI/sissi.h \
	../objects/SISSI/sissi_dialog.c \
	../objects/SISSI/sissi_object.c \
	../objects/SISSI/site.c \
	../objects/UML/activity.c \
	../objects/UML/actor.c \
	../objects/UML/association.c \
	../objects/UML/class.c \
	../objects/UML/class_dialog.c \
	../objects/UML/classicon.c \
	../objects/UML/component.c \
	../objects/UML/component_feature.c \
	../objects/UML/constraint.c \
	../objects/UML/dependency.c \
	../objects/UML/generalization.c \
	../objects/UML/implements.c \
	../objects/UML/large_package.c \
	../objects/UML/lifeline.c \
	../objects/UML/message.c \
	../objects/UML/node.c \
	../objects/UML/note.c \
	../objects/UML/object.c \
	../objects/UML/realizes.c \
	../objects/UML/small_package.c \
	../objects/UML/state.c \
	../objects/UML/state_term.c \
	../objects/UML/transition.c \
	../objects/UML/uml.c \
	../objects/UML/umlattribute.c \
	../objects/UML/umlformalparameter.c \
	../objects/UML/umloperation.c \
	../objects/UML/umlparameter.c \
	../objects/UML/usecase.c \
	../objects/bondgraph/bondgraph.c \
	../objects/chronogram/chronogram.c \
	../objects/chronogram/chronoline.c \
	../objects/chronogram/chronoref.c \
	../objects/custom/custom.c \
	../objects/custom/custom_object.c \
	../objects/custom_lines/custom_lines.c \
	../objects/custom_lines/custom_linetypes.c \
	../objects/custom/shape_info.c \
	../objects/flowchart/box.c \
	../objects/flowchart/diamond.c \
	../objects/flowchart/ellipse.c \
	../objects/flowchart/flowchart.c \
	../objects/flowchart/parallelogram.c \
	../objects/network/basestation.c \
	../objects/network/bus.c \
	../objects/network/network.c \
	../objects/network/radiocell.c \
	../objects/network/wanlink.c \
	../objects/standard/arc.c \
	../objects/standard/bezier.c \
	../objects/standard/beziergon.c \
	../objects/standard/box.c \
	../objects/standard/ellipse.c \
	../objects/standard/image.c \
	../objects/standard/line.c \
	../objects/standard/outline.c \
	../objects/standard/polygon.c \
	../objects/standard/polyline.c \
	../objects/standard/standard.c \
	../objects/standard/textobj.c \
	../objects/standard/zigzagline.c \
	../plug-ins/cairo/diacairo-interactive.c \
	../plug-ins/cairo/diacairo.c \
	../plug-ins/cgm/cgm.c \
	../plug-ins/dxf/dxf-export.c \
	../plug-ins/dxf/dxf-import.c \
	../plug-ins/dxf/dxf.c \
	../plug-ins/gprint/diagnomeprint.c \
	../plug-ins/gprint/diagnomeprintrenderer.c \
	../plug-ins/hpgl/hpgl.c \
	../plug-ins/libart/export_png.c \
	../plug-ins/libart/render_libart.c \
	../plug-ins/libart/dialibartrenderer.c \
	../plug-ins/metapost/metapost.c \
	../plug-ins/metapost/render_metapost.c \
	../plug-ins/pgf/pgf.c \
	../plug-ins/pgf/render_pgf.c \
	../plug-ins/pixbuf/pixbuf.c \
	../plug-ins/postscript/paginate_psprint.c \
	../plug-ins/postscript/diapsrenderer.c \
	../plug-ins/postscript/diapsft2renderer.c \
	../plug-ins/postscript/render_eps.c \
	../plug-ins/postscript/postscript.c \
	../plug-ins/pstricks/pstricks.c \
	../plug-ins/pstricks/render_pstricks.c \
	../plug-ins/python/pydia-render.c \
	../plug-ins/python/python.c \
	../plug-ins/shape/shape-export.c \
	../plug-ins/shape/shape.c \
	../plug-ins/svg/render_svg.c \
	../plug-ins/svg/svg-import.c \
	../plug-ins/svg/svg.c \
	../plug-ins/vdx/vdx-export.c \
	../plug-ins/vdx/vdx-import.c \
	../plug-ins/vdx/vdx-xml.c \
	../plug-ins/vdx/vdx.c \
	../plug-ins/wmf/wmf.cpp \
	../plug-ins/wpg/wpg.c \
	../plug-ins/xfig/xfig-export.c \
	../plug-ins/xfig/xfig-import.c \
	../plug-ins/xfig/xfig.c \
	../plug-ins/xslt/xslt.c \
	../plug-ins/xslt/xsltdialog.c \
	../sheets/AADL.sheet.in \
	../sheets/Assorted.sheet.in \
	../sheets/BPMN.sheet.in \
	../sheets/ChemEng.sheet.in \
	../sheets/Circuit.sheet.in \
	../sheets/Contact.sheet.in \
	../sheets/Cybernetics.sheet.in \
	../sheets/Database.sheet.in \
	../sheets/ER.sheet.in \
	../sheets/Electric.sheet.in \
	../sheets/FS.sheet.in \
	../sheets/Flowchart.sheet.in \
	../sheets/GRAFCET.sheet.in \
	../sheets/Gane_and_Sarson.sheet.in \
	../sheets/IsometricMap.sheet.in \
	../sheets/Istar.sheet.in \
	../sheets/Jackson.sheet.in \
	../sheets/KAOS.sheet.in \
	../sheets/Lights.sheet.in \
	../sheets/Logic.sheet.in \
	../sheets/MSE.sheet.in \
	../sheets/Misc.sheet.in \
	../sheets/Pneumatic.sheet.in \
	../sheets/SADT.sheet.in \
	../sheets/SDL.sheet.in \
	../sheets/SISSI.sheet.in \
	../sheets/UML.sheet.in \
	../sheets/chronogram.sheet.in \
	../sheets/ciscocomputer.sheet.in \
	../sheets/ciscohub.sheet.in \
	../sheets/ciscomisc.sheet.in \
	../sheets/cisconetwork.sheet.in \
	../sheets/ciscotelephony.sheet.in \
	../sheets/civil.sheet.in \
	../sheets/jigsaw.sheet.in \
	../sheets/network.sheet.in \
	../sheets/sybase.sheet.in
# This comment gets stripped out

CATALOGS=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.gmo "; done)

.SUFFIXES:
.SUFFIXES: .po .pox .gmo .mo .msg .cat

.po.pox:
	$(MAKE) $(GETTEXT_PACKAGE).pot
	$(MSGMERGE) $< $(GETTEXT_PACKAGE).pot -o $*.pox

.po.mo:
	$(MSGFMT) -o $@ $<

.po.gmo:
	file=`echo $* | sed 's,.*/,,'`.gmo \
	  && rm -f $$file && $(GMSGFMT) -o $$file $<

.po.cat:
	sed -f ../intl/po2msg.sed < $< > $*.msg \
	  && rm -f $@ && gencat $@ $*.msg


all: all-yes

all-yes: $(CATALOGS)
all-no:

$(GETTEXT_PACKAGE).pot: $(POTFILES)
	$(GENPOT)

install: install-data
install-data: install-data-yes
install-data-no: all
install-data-yes: all
	$(mkdir_p) $(DESTDIR)$(itlocaledir)
	linguas="$(USE_LINGUAS)"; \
	for lang in $$linguas; do \
	  dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \
	  $(mkdir_p) $$dir; \
	  if test -r $$lang.gmo; then \
	    $(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
	    echo "installing $$lang.gmo as $$dir/$(GETTEXT_PACKAGE).mo"; \
	  else \
	    $(INSTALL_DATA) $(srcdir)/$$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
	    echo "installing $(srcdir)/$$lang.gmo as" \
		 "$$dir/$(GETTEXT_PACKAGE).mo"; \
	  fi; \
	  if test -r $$lang.gmo.m; then \
	    $(INSTALL_DATA) $$lang.gmo.m $$dir/$(GETTEXT_PACKAGE).mo.m; \
	    echo "installing $$lang.gmo.m as $$dir/$(GETTEXT_PACKAGE).mo.m"; \
	  else \
	    if test -r $(srcdir)/$$lang.gmo.m ; then \
	      $(INSTALL_DATA) $(srcdir)/$$lang.gmo.m \
		$$dir/$(GETTEXT_PACKAGE).mo.m; \
	      echo "installing $(srcdir)/$$lang.gmo.m as" \
		   "$$dir/$(GETTEXT_PACKAGE).mo.m"; \
	    else \
	      true; \
	    fi; \
	  fi; \
	done

# Empty stubs to satisfy archaic automake needs
dvi info tags TAGS ID:

# Define this as empty until I found a useful application.
install-exec installcheck:

uninstall:
	linguas="$(USE_LINGUAS)"; \
	for lang in $$linguas; do \
	  rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \
	  rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \
	done

check: all $(GETTEXT_PACKAGE).pot
	rm -f missing notexist
	srcdir=$(srcdir) $(INTLTOOL_UPDATE) -m
	if [ -r missing -o -r notexist ]; then \
	  exit 1; \
	fi

mostlyclean:
	rm -f *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp
	rm -f .intltool-merge-cache

clean: mostlyclean

distclean: clean
	rm -f Makefile Makefile.in POTFILES stamp-it
	rm -f *.mo *.msg *.cat *.cat.m *.gmo

maintainer-clean: distclean
	@echo "This command is intended for maintainers to use;"
	@echo "it deletes files that may require special tools to rebuild."
	rm -f Makefile.in.in

distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
dist distdir: $(DISTFILES)
	dists="$(DISTFILES)"; \
	extra_dists="$(EXTRA_DISTFILES)"; \
	for file in $$extra_dists; do \
	  test -f $(srcdir)/$$file && dists="$$dists $(srcdir)/$$file"; \
	done; \
	for file in $$dists; do \
	  test -f $$file || file="$(srcdir)/$$file"; \
	  ln $$file $(distdir) 2> /dev/null \
	    || cp -p $$file $(distdir); \
	done

update-po: Makefile
	$(MAKE) $(GETTEXT_PACKAGE).pot
	tmpdir=`pwd`; \
	linguas="$(USE_LINGUAS)"; \
	for lang in $$linguas; do \
	  echo "$$lang:"; \
	  result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \
	  if $$result; then \
	    if cmp $(srcdir)/$$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
	      rm -f $$tmpdir/$$lang.new.po; \
            else \
	      if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
	        :; \
	      else \
	        echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
	        rm -f $$tmpdir/$$lang.new.po; \
	        exit 1; \
	      fi; \
	    fi; \
	  else \
	    echo "msgmerge for $$lang.gmo failed!"; \
	    rm -f $$tmpdir/$$lang.new.po; \
	  fi; \
	done

Makefile POTFILES: stamp-it
	@if test ! -f $@; then \
	  rm -f stamp-it; \
	  $(MAKE) stamp-it; \
	fi

stamp-it: Makefile.in.in $(top_builddir)/config.status POTFILES.in
	cd $(top_builddir) \
	  && CONFIG_FILES=$(subdir)/Makefile.in CONFIG_HEADERS= CONFIG_LINKS= \
	       $(SHELL) ./config.status

# Tell versions [3.59,3.63) of GNU make not to export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
